package cn.cq.admin.controller;

import cn.cq.admin.service.SystemService;
import cn.dev33.satoken.util.SaResult;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse;

/**
 * cn.cq.admin.controller
 *
 * @author  dicraft
 */
@RestController
@RequestMapping("/system")
public class SystemController {

    @Resource
    private SystemService systemService;

    @GetMapping("/createShearCaptcha")
    public SaResult createShearCaptcha(HttpServletResponse response) {
        return systemService.createShearCaptcha(response);
    }

    @GetMapping("/createCircleCaptcha/{key}")
    public SaResult createCircleCaptcha(HttpServletResponse response, @PathVariable("key") String key) {
        return systemService.createCircleCaptcha(response,key);
    }
}
